#include <stdio.h>

void i_c_c()
{
  /*4005fc:	a9bc7bfd 	stp	x29, x30, [sp, #-64]!
  400600:	910003fd 	mov	x29, sp
  400604:	52809a40 	mov	w0, #0x4d2                 	// #1234
  400608:	b9003fa0 	str	w0, [x29, #60]*/
	int a = 1234;

  /*40060c:	a901ffbf 	stp	xzr, xzr, [x29, #24]
  400610:	a902ffbf 	stp	xzr, xzr, [x29, #40]*/
	char b[32] = {0};

  /*400614:	b9003bbf 	str	wzr, [x29, #56]*/
	int c = 0;

  /*400618:	b9403fa0 	ldr	w0, [x29, #60]				// a
  40061c:	5289ba61 	mov	w1, #0x4dd3                	// #19923
  400620:	72a20c41 	movk	w1, #0x1062, lsl #16	// w1 = 0x10624dd3
  400624:	9b217c01 	smull	x1, w0, w1				// x1 = 1234*0x10624dd3 = 0x4ef9db2316
  400628:	d360fc21 	lsr	x1, x1, #32					// x1 = 0x4e		2^36 / 274877907 = 999.9999 = 1000 
  40062c:	13067c21 	asr	w1, w1, #6					// w1 = 1
  400630:	131f7c00 	asr	w0, w0, #31					// w0 = 0
  400634:	4b000020 	sub	w0, w1, w0					// w0 = 1
  400638:	b9003ba0 	str	w0, [x29, #56]*/
	c = a / 1000;


  /*40063c:	90000000 	adrp	x0, 400000 <_init-0x480>
  400640:	9127c000 	add	x0, x0, #0x9f0
  400644:	52801d42 	mov	w2, #0xea                  	// #234
  400648:	b9403ba1 	ldr	w1, [x29, #56]
  40064c:	97ffffa9 	bl	4004f0 <printf@plt>*/
	  printf("%d %d\n", c, 0xea);

  /*400650:	b9403ba0 	ldr	w0, [x29, #56]				// c
  400654:	12001c00 	and	w0, w0, #0xff				// w0 = c&0xff
  400658:	1100c000 	add	w0, w0, #0x30				// w0 = (c&0xff)+0x30
  40065c:	12001c00 	and	w0, w0, #0xff				// w0 = ((c&0xff)+0x30)&0xff
  400660:	390063a0 	strb	w0, [x29, #24]*/
	  b[0] = c + 0x30;

  /*400664:	b9403fa0 	ldr	w0, [x29, #60]				// c
  400668:	5290a3e1 	mov	w1, #0x851f                	// #34079
  40066c:	72aa3d61 	movk	w1, #0x51eb, lsl #16	// w1 = 0x51eb851f
  400670:	9b217c01 	smull	x1, w0, w1				// x1 = 1234*0x51eb851f = 0x18AE147AF6E
  400674:	d360fc21 	lsr	x1, x1, #32					// x1 = 0x18A
  400678:	13057c21 	asr	w1, w1, #5					// w1 = 0x18A>>5 = 12	(2^37/1374389535 = 99.999999 = 100)
  40067c:	131f7c00 	asr	w0, w0, #31					// w0 = 0
  400680:	4b000021 	sub	w1, w1, w0					// w1 = 12-0 = 12
  400684:	528ccce0 	mov	w0, #0x6667                	// #26215
  400688:	72acccc0 	movk	w0, #0x6666, lsl #16	// w0 = 0x66666667
  40068c:	9b207c20 	smull	x0, w1, w0				// x0 = 12*0x66666667 = 0x4CCCCCCD4
  400690:	d360fc00 	lsr	x0, x0, #32					// x0 = 0x4
  400694:	13027c02 	asr	w2, w0, #2					// w2 = 1			(2^34/1717986919 = 9.999999 = 10)
  400698:	131f7c20 	asr	w0, w1, #31					// w0 = 0
  40069c:	4b000042 	sub	w2, w2, w0					// w2 = 1-0 = 1
  4006a0:	2a0203e0 	mov	w0, w2						// w0 = 1
  4006a4:	531e7400 	lsl	w0, w0, #2					// w0 = 4
  4006a8:	0b020000 	add	w0, w0, w2					// w0 = 4+1 = 5
  4006ac:	531f7800 	lsl	w0, w0, #1					// w0 = 10
  4006b0:	4b000020 	sub	w0, w1, w0					// w0 = 12-10 = 2
  4006b4:	b9003ba0 	str	w0, [x29, #56]				// [x29+56] = 2*/
	c = a / 100 % 10;

  /*4006b8:	b9403ba0 	ldr	w0, [x29, #56]				// w0 = 2
  4006bc:	12001c00 	and	w0, w0, #0xff				// w0 = 2
  4006c0:	1100c000 	add	w0, w0, #0x30				// w0 = 2+0x30
  4006c4:	12001c00 	and	w0, w0, #0xff				// w0 = (2+0x30)&0xff
  4006c8:	390067a0 	strb	w0, [x29, #25]*/
	b[1] = c + 0x30;

  /*4006cc:	b9403fa0 	ldr	w0, [x29, #60]				// w0 = a 
  4006d0:	528ccce1 	mov	w1, #0x6667                	// #26215
  4006d4:	72acccc1 	movk	w1, #0x6666, lsl #16	// w1 = 0x66666667
  4006d8:	9b217c01 	smull	x1, w0, w1				// x1 = 1234*0x66666667 = 0x1ED 9999 9C7E 
  4006dc:	d360fc21 	lsr	x1, x1, #32					// x1 = 0x1ED
  4006e0:	13027c21 	asr	w1, w1, #2					// w1 = (0x1ED>>2) = 123	(2^34/1717986919 = 9.999999 = 10)
  4006e4:	131f7c00 	asr	w0, w0, #31					// w0 = 0
  4006e8:	4b000021 	sub	w1, w1, w0					// w1 = 123-0 = 123
  4006ec:	528ccce0 	mov	w0, #0x6667                	// #26215
  4006f0:	72acccc0 	movk	w0, #0x6666, lsl #16	// w0 = 0x66666667
  4006f4:	9b207c20 	smull	x0, w1, w0				// x0 = 123*0x66666667 = 0x31 3333 337D
  4006f8:	d360fc00 	lsr	x0, x0, #32					// x0 = 0x31
  4006fc:	13027c02 	asr	w2, w0, #2					// w2 = (0x31>>2) = 12		(2^34/1717986919 = 9.999999 = 10)
  400700:	131f7c20 	asr	w0, w1, #31					// w0 = 0
  400704:	4b000042 	sub	w2, w2, w0					// w2 = 12-0 = 12
  400708:	2a0203e0 	mov	w0, w2						// w0 = 12
  40070c:	531e7400 	lsl	w0, w0, #2					// w0 = 12*4 = 48
  400710:	0b020000 	add	w0, w0, w2					// w0 = 48+12 = 60
  400714:	531f7800 	lsl	w0, w0, #1					// w0 = 60*2 = 120
  400718:	4b000020 	sub	w0, w1, w0					// w0 = 123-120 = 3
  40071c:	b9003ba0 	str	w0, [x29, #56]*/
	c = a / 10 % 10;

  /*400720:	b9403ba0 	ldr	w0, [x29, #56]				// c
  400724:	12001c00 	and	w0, w0, #0xff				// c = c&0xff
  400728:	1100c000 	add	w0, w0, #0x30				// c = c+0x30
  40072c:	12001c00 	and	w0, w0, #0xff
  400730:	39006ba0 	strb	w0, [x29, #26]*/
	b[2] = c + 0x30;

  /*400734:	b9403fa1 	ldr	w1, [x29, #60]				// c
  400738:	528ccce0 	mov	w0, #0x6667                	// #26215
  40073c:	72acccc0 	movk	w0, #0x6666, lsl #16	// w0 = 0x66666667
  400740:	9b207c20 	smull	x0, w1, w0				// x0 = 1234*0x66666667 = 0x1ED 9999 9C7E
  400744:	d360fc00 	lsr	x0, x0, #32					// x0 = 0x1ED
  400748:	13027c02 	asr	w2, w0, #2					// w2 = (0x1ED>>2) = 123	(2^34/1717986919 = 9.999999 = 10)
  40074c:	131f7c20 	asr	w0, w1, #31					// w0 = 0
  400750:	4b000042 	sub	w2, w2, w0					// w2 = 123-0 = 123
  400754:	2a0203e0 	mov	w0, w2						// w0 = 123
  400758:	531e7400 	lsl	w0, w0, #2					// w0 = 492
  40075c:	0b020000 	add	w0, w0, w2					// w0 = 492+123 = 615
  400760:	531f7800 	lsl	w0, w0, #1					// w0 = 615*2 = 1230
  400764:	4b000020 	sub	w0, w1, w0					// w0 = 1234-1230 = 4
  400768:	b9003ba0 	str	w0, [x29, #56]*/
	c = a % 10;

  /*40076c:	b9403ba0 	ldr	w0, [x29, #56]				// w0 = c
  400770:	12001c00 	and	w0, w0, #0xff
  400774:	1100c000 	add	w0, w0, #0x30				// w0 = c+0x30
  400778:	12001c00 	and	w0, w0, #0xff
  40077c:	39006fa0 	strb	w0, [x29, #27]*/
	b[3] = c + 0x30;

  /*400780:	910063a1 	add	x1, x29, #0x18
  400784:	90000000 	adrp	x0, 400000 <_init-0x480>
  400788:	91280000 	add	x0, x0, #0xa00
  40078c:	97ffff59 	bl	4004f0 <printf@plt>*/
	printf("%s\n", b);

  /*400790:	d503201f 	nop
  400794:	a8c47bfd 	ldp	x29, x30, [sp], #64
  400798:	d65f03c0 	ret*/
}

void h_c_c()
{
  /*40079c:	a9bc7bfd 	stp	x29, x30, [sp, #-64]!
  4007a0:	910003fd 	mov	x29, sp
  4007a4:	5299bde0 	mov	w0, #0xcdef                	// #52719
  4007a8:	72a01560 	movk	w0, #0xab, lsl #16
  4007ac:	b9003fa0 	str	w0, [x29, #60]*/
	int a = 0xabcdef;

  /*4007b0:	a901ffbf 	stp	xzr, xzr, [x29, #24]
  4007b4:	a902ffbf 	stp	xzr, xzr, [x29, #40]*/
	char b[32] = {0};

  /*4007b8:	b9003bbf 	str	wzr, [x29, #56]*/
	int c = 0;

  /*4007bc:	b9403fa0 	ldr	w0, [x29, #60]
  4007c0:	13147c00 	asr	w0, w0, #20
  4007c4:	b9003ba0 	str	w0, [x29, #56]*/
	c = a >> 20;

  /*4007c8:	b9403ba0 	ldr	w0, [x29, #56]
  4007cc:	12001c00 	and	w0, w0, #0xff
  4007d0:	11015c00 	add	w0, w0, #0x57
  4007d4:	12001c00 	and	w0, w0, #0xff
  4007d8:	390063a0 	strb	w0, [x29, #24]*/
	  b[0] = c + 0x57;

  /*4007dc:	b9403fa0 	ldr	w0, [x29, #60]
  4007e0:	13107c00 	asr	w0, w0, #16
  4007e4:	b9003ba0 	str	w0, [x29, #56]*/
	c = a >> 16;

  /*4007e8:	b9403ba0 	ldr	w0, [x29, #56]
  4007ec:	12000c00 	and	w0, w0, #0xf
  4007f0:	b9003ba0 	str	w0, [x29, #56]*/
	c &= 0xf;

  /*4007f4:	b9403ba0 	ldr	w0, [x29, #56]
  4007f8:	12001c00 	and	w0, w0, #0xff
  4007fc:	11015c00 	add	w0, w0, #0x57
  400800:	12001c00 	and	w0, w0, #0xff
  400804:	390067a0 	strb	w0, [x29, #25]*/
	b[1] = c + 0x57;

  /*400808:	b9403fa0 	ldr	w0, [x29, #60]
  40080c:	130c7c00 	asr	w0, w0, #12
  400810:	b9003ba0 	str	w0, [x29, #56]*/
	c = a >> 12;

  /*400814:	b9403ba0 	ldr	w0, [x29, #56]
  400818:	12000c00 	and	w0, w0, #0xf
  40081c:	b9003ba0 	str	w0, [x29, #56]*/
	c &= 0xf;

  /*400820:	b9403ba0 	ldr	w0, [x29, #56]
  400824:	12001c00 	and	w0, w0, #0xff
  400828:	11015c00 	add	w0, w0, #0x57
  40082c:	12001c00 	and	w0, w0, #0xff
  400830:	39006ba0 	strb	w0, [x29, #26]*/
	b[2] = c + 0x57;

  /*400834:	b9403fa0 	ldr	w0, [x29, #60]
  400838:	13087c00 	asr	w0, w0, #8
  40083c:	b9003ba0 	str	w0, [x29, #56]*/
	c = a >> 8;

  /*400840:	b9403ba0 	ldr	w0, [x29, #56]
  400844:	12000c00 	and	w0, w0, #0xf
  400848:	b9003ba0 	str	w0, [x29, #56]*/
	c &= 0xf;

  /*40084c:	b9403ba0 	ldr	w0, [x29, #56]
  400850:	12001c00 	and	w0, w0, #0xff
  400854:	11015c00 	add	w0, w0, #0x57
  400858:	12001c00 	and	w0, w0, #0xff
  40085c:	39006fa0 	strb	w0, [x29, #27]*/
	b[3] = c + 0x57;

  /*400860:	b9403fa0 	ldr	w0, [x29, #60]
  400864:	13047c00 	asr	w0, w0, #4
  400868:	b9003ba0 	str	w0, [x29, #56]*/
	c = a >> 4;

  /*40086c:	b9403ba0 	ldr	w0, [x29, #56]
  400870:	12000c00 	and	w0, w0, #0xf
  400874:	b9003ba0 	str	w0, [x29, #56]*/
	c &= 0xf;

  /*400878:	b9403ba0 	ldr	w0, [x29, #56]
  40087c:	12001c00 	and	w0, w0, #0xff
  400880:	11015c00 	add	w0, w0, #0x57
  400884:	12001c00 	and	w0, w0, #0xff
  400888:	390073a0 	strb	w0, [x29, #28]*/
	b[4] = c + 0x57;

  /*40088c:	b9403fa0 	ldr	w0, [x29, #60]
  400890:	b9003ba0 	str	w0, [x29, #56]*/
	c = a >> 0;

  /*400894:	b9403ba0 	ldr	w0, [x29, #56]
  400898:	12000c00 	and	w0, w0, #0xf
  40089c:	b9003ba0 	str	w0, [x29, #56]*/
	c &= 0xf;

  /*4008a0:	b9403ba0 	ldr	w0, [x29, #56]
  4008a4:	12001c00 	and	w0, w0, #0xff
  4008a8:	11015c00 	add	w0, w0, #0x57
  4008ac:	12001c00 	and	w0, w0, #0xff
  4008b0:	390077a0 	strb	w0, [x29, #29]*/
	b[5] = c + 0x57;

  /*4008b4:	910063a1 	add	x1, x29, #0x18
  4008b8:	90000000 	adrp	x0, 400000 <_init-0x480>
  4008bc:	91286000 	add	x0, x0, #0xa18
  4008c0:	97ffff0c 	bl	4004f0 <printf@plt>*/
	printf("%s\n", b);

  /*4008c4:	d503201f 	nop
  4008c8:	a8c47bfd 	ldp	x29, x30, [sp], #64
  4008cc:	d65f03c0 	ret*/
}

int main()
{
  /*4008d0:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  4008d4:	910003fd 	mov	x29, sp
  4008d8:	52800600 	mov	w0, #0x30                  	// #48
  4008dc:	39007fa0 	strb	w0, [x29, #31]*/
	char a = 0x30;

  /*4008e0:	39407fa1 	ldrb	w1, [x29, #31]
  4008e4:	39407fa2 	ldrb	w2, [x29, #31]
  4008e8:	90000000 	adrp	x0, 400000 <_init-0x480>
  4008ec:	9128c000 	add	x0, x0, #0xa30
  4008f0:	97ffff00 	bl	4004f0 <printf@plt>*/
	  printf("a = %d = %c\n", a, a);

  /*4008f4:	52800020 	mov	w0, #0x1                   	// #1
  4008f8:	39007fa0 	strb	w0, [x29, #31]*/
	  a = 0x1;

  /*4008fc:	39407fa1 	ldrb	w1, [x29, #31]
  400900:	39407fa2 	ldrb	w2, [x29, #31]
  400904:	90000000 	adrp	x0, 400000 <_init-0x480>
  400908:	9128c000 	add	x0, x0, #0xa30
  40090c:	97fffef9 	bl	4004f0 <printf@plt>*/
	printf("a = %d = %c\n", a, a); 

  /*400910:	52800620 	mov	w0, #0x31                  	// #49
  400914:	39007fa0 	strb	w0, [x29, #31]*/
	a = 0x31;

  /*400918:	39407fa1 	ldrb	w1, [x29, #31]
  40091c:	39407fa2 	ldrb	w2, [x29, #31]
  400920:	90000000 	adrp	x0, 400000 <_init-0x480>
  400924:	9128c000 	add	x0, x0, #0xa30
  400928:	97fffef2 	bl	4004f0 <printf@plt>*/
	printf("a = %d = %c\n", a, a); 

  /*40092c:	97ffff34 	bl	4005fc <i_c_c>*/
	i_c_c();

  /*400930:	97ffff9b 	bl	40079c <h_c_c>*/
	h_c_c();

  /*400934:	d503201f 	nop
  400938:	a8c27bfd 	ldp	x29, x30, [sp], #32
  40093c:	d65f03c0 	ret*/
	return 0;
}
